package com.hzy.dao.sysUser.impl;

import com.hzy.dao.sysUser.SysUserMapper;
import com.hzy.pojo.SysUser;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

/**
 * @Package: com.hzy.dao.sysUser.impl
 * @ClassName: SysUserMapperImpl
 * @Author: 862982795
 * @CreateTime: 2021/07/08 17:44
 * @Description:
 */
public class SysUserMapperImpl extends SqlSessionDaoSupport implements SysUserMapper {
    private SqlSessionTemplate sqlSession;
    //查询用户列表
    @Override
    public List<SysUser> selectSysUserList(SysUser sysUser) {
        return this.getSqlSession().selectList("com.hzy.dao.SysUserMapper.selectSysUserList",sysUser);
    }

    @Override
    public Integer add(SysUser sysUser) {
        return sqlSession.getMapper(SysUserMapper.class).add(sysUser);
    }

    public SqlSessionTemplate getSqlSession() {
        return sqlSession;
    }

    public void setSqlSession(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }
}
